/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entityprojet;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author T.Ron
 */
@Embeddable
public class PeriodePK implements Serializable {
    @Basic(optional = false)
    @Column(name = "NUMEXO")
    private int numexo;
    @Basic(optional = false)
    @Column(name = "MOIS")
    private int mois;

    public PeriodePK() {
    }

    public PeriodePK(int numexo, int mois) {
        this.numexo = numexo;
        this.mois = mois;
    }

    public int getNumexo() {
        return numexo;
    }

    public void setNumexo(int numexo) {
        this.numexo = numexo;
    }

    public int getMois() {
        return mois;
    }

    public void setMois(int mois) {
        this.mois = mois;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) numexo;
        hash += (int) mois;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PeriodePK)) {
            return false;
        }
        PeriodePK other = (PeriodePK) object;
        if (this.numexo != other.numexo) {
            return false;
        }
        if (this.mois != other.mois) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityprojet.PeriodePK[ numexo=" + numexo + ", mois=" + mois + " ]";
    }
    
}
